SDLMagic - An Improved Magic Set Technique

نویسنده

  • Stefan Brass
چکیده

We present a rewriting method for Datalog-programs which simulates SLD-resolution more closely than the ordinary “magic set” method does. This is especially advantageous in the case of tail-recursive programs, but already in nonrecursive programs we can often save a number of joins. In contrast to the method of ROSS [7], we do not only solve the problem of tail-recursion, but try to simulate SLD-resolution as fully as possible. An especially nice feature of our approach is that we get many other known optimizations “for free” in this way. Based on an idea of BRY [3], our method can be described in an elegant way by means of a meta-interpreter. This also allows to compare the efficiency of SLD-resolution and magic sets within a common framework. We then develop a combined method, which allows to choose the evaluation strategy for every body literal.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

SLDMagic | An Improved Magic Set Technique

We present a rewriting method for Datalog-programs which simulates SLD-resolution more closely than the ordinary \magic set" method does. This is especially advantageous in the case of tail-recursive programs, but already in non-recursive programs we can often save a number of joins. In contrast to the method of Ross 7], we do not only solve the problem of tail-recursion, but try to simulate SL...

متن کامل

A Reed–Solomon Code Magic Trick

Richard Ehrenborg [1] has provided a nice magic trick that can be used to illustrate many properties of Hamming codes. His paper includes a set of manipulatives that can be used to implement the trick. An improved version of this Hamming code magic trick is described in a recent paper in Math Horizons [3]. In this paper, we introduce a similar magic trick that is based on a Reed–Solomon code. I...

متن کامل

Enhancing the Magic-Set Method for Disjunctive Datalog Programs

We present a new technique for the optimization of (partially) bound queries over disjunctive datalog programs. The technique exploits the propagation of query bindings, and extends the Magic-Set optimization technique (originally defined for non-disjunctive programs) to the disjunctive case, substantially improving on previously defined approaches. Magic-Set-transformed disjunctive programs fr...

متن کامل

On Barycentric-Magic Graphs

Let $A$ be an abelian group. A graph $G=(V,E)$ is said to be $A$-barycentric-magic if there exists a labeling $l:E(G)longrightarrow Asetminuslbrace{0}rbrace$ such that the induced vertex set labeling $l^{+}:V(G)longrightarrow A$ defined by $l^{+}(v)=sum_{uvin E(G)}l(uv)$ is a constant map and also satisfies that $l^{+}(v)=deg(v)l(u_{v}v)$ for all $v in V$, and for some vertex $u_{v}$ adjacent t...

متن کامل

INTEGER-MAGIC SPECTRA OF CYCLE RELATED GRAPHS

For any h in N , a graph G = (V, E) is said to be h-magic if there exists a labeling l: E(G) to Z_{h}-{0} such that the induced vertex set labeling l^{+: V(G) to Z_{h}} defined by l^{+}(v)= Summation of l(uv)such that e=uvin in E(G) is a constant map. For a given graph G, the set of all for which G is h-magic is called the integer-magic spectrum of G and is denoted by IM(G). In this paper, the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996